<template>
    <view class="scrollCom">
        <scroll-view scroll-y :style="{height: `${scrollViewHeight-90}px`, position: 'fixed',top: `${allHeight+90}px`,left: 0, bottom: 0, right: 0,'z-index': 4,
		}" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll">
            <slot></slot>
        </scroll-view>
    </view>
</template>

<script>
    import {
        allHeight,
        scrollViewHeight
    } from '@/scripts/compatible/clientRect.js'
    export default {
        data() {
            return {
                scrollViewHeight: 0,
                allHeight: 0,
            }
        },
        mounted() {
            this.scrollViewHeight_init()
        },
        methods: {
            scrollViewHeight_init() {
                this.$set(this, 'scrollViewHeight', scrollViewHeight)
                this.$set(this, 'allHeight', allHeight)
            },
            upper: function(e) {
                // console.log(e)
            },
            lower: function(e) {
                // console.log(e)
            },
            scroll: function(e) {
                // console.log(e)
            },
        },

    }
</script>

<style lang="scss" scoped>
    .scrollCom {}
</style>